<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <table border="2px" cellpadding="0px" cellspacing="0px">
        <tr>
            <td>下标</td>
            <td>学号</td>
            <td>姓名</td>
            <td>年龄</td>
        </tr>
        <tr th:each="user,uersStat:${list}">
            <!--th:text获取文本数据，替换双标签-->
            <td th:text="${uersStat.index}"></td>
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.age}"></td>
        </tr>
    </table>

<hr/>
    <!--
    th:text 获取文本数据，但可以显示html的标签，直接打印，不解析
    th:utext 获取文本数据，将html语言标签进行解析
    -->
    <div th:each="map,mapStat:${datamap}">
        <div th:text="${map}"></div><br/>
        KEY:<span th:text="${mapStat.current.key}"></span>
        VALUE:<span th:utext="${mapStat.current.value}"></span>
    </div><hr/>

    <div th:each="nm,nmStat:${nm}">
        <span th:text="${nmStat.count}"></span>
        <span th:text="${nm}"></span>
    </div><hr/>

    <div>
        <span th:text="${#dates.format(now,'yyyy-MM-dd hh:mm:ss')}"></span>
    </div><hr/>

 <!--   <div>
        <span th:if="${age<24}"></span>
        毕业说走就走
    </div>-->
 <a class="|${class1}${class2}|">超链接</a>

</body>
</html>